<?php

function long_function()
{
    if ($longFunction) {
        // This is a long
        // IF statement
        // that does
        // not have
        // and ELSE
        // block on it
        $variable = 'hello';

        if ($variable === 'hello') {
            // This is a short
            // IF statement
        }

        if ($variable === 'hello') {
            // This is a short
            // IF statement
        } else {
            // This is a short ELSE
            // statement
        }
    }//end if

    if ($longFunction) {
        // This is a long
        // IF statement
        // that does
        // not have
        // and ELSE
        // block on it
        $variable = 'hello';

        if ($variable === 'hello') {
            // This is a short
            // IF statement
        }

        if ($variable === 'hello') {
            // This is a short
            // IF statement
        } else {
            // This is a short ELSE
            // statement
        }
    }

    if ($longFunction) {
        // This is a long
        // IF statement
        // that does
        // not have
        // and ELSE
        // block on it
        $variable = 'hello';

        if ($variable === 'hello') {
            // This is a short
            // IF statement
        }

        if ($variable === 'hello') {
            // This is a short
            // IF statement
        } else {
            // This is a short ELSE
            // statement
        }
    } else {
        // Short ELSE
    }//end if

    if ($longFunction) {
        // This is a long
        // IF statement
        // that does
        // not have
        // and ELSE
        // block on it
        $variable = 'hello';

        if ($variable === 'hello') {
            // This is a short
            // IF statement
        }

        if ($variable === 'hello') {
            // This is a short
            // IF statement
        } else {
            // This is a short ELSE
            // statement
        }
    } else {
        // Short ELSE
    }
}

foreach ($var as $val) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}//end foreach

foreach ($var as $val) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    foreach ($blah as $val) {
        // Short foreach.
    }
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}

for ($var =1; $var < 20; $var++) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}//end for

for ($var =1; $var < 20; $var++) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    for ($val =1; $val < 20; $val++) {
        // Short for.
    }
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}

while ($var < 20) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}//end while looping

while ($var < 20) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    while ($something) {
        // Short while.
    }
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}

if ($longFunction) {
    // This is a long
    // IF statement
    // that does
    // not have
    // and ELSE
    // block on it
    $variable = 'hello';

    if ($variable === 'hello') {
        // This is a short
        // IF statement
    }

    if ($variable === 'hello') {
        // This is a short
        // IF statement
    } else {
        // This is a short ELSE
        // statement
    }
} //end if

if ($longFunction) {
    // This is a long
    // IF statement
    // that does
    // not have
    // and ELSE
    // block on it
    $variable = 'hello';

    if ($variable === 'hello') {
        // This is a short
        // IF statement
    }

    if ($variable === 'hello') {
        // This is a short
        // IF statement
    } else {
        // This is a short ELSE
        // statement
    }
} else {
    // Short ELSE
} //end if

foreach ($var as $val) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
} //end foreach

for ($var =1; $var < 20; $var++) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
} //end for

while ($var < 20) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
} //end while

while ($var < 20) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}//end for

if (true) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
} else if ($condition) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
} elseif ($cond) {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
} else {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}//end if

if ($something) {
    // Line 1
    // Line 2
} else if ($somethingElse) {
    // Line 1
    // Line 2
} else {
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    // Line 6
    // Line 7
    // Line 8
    // Line 9
    // Line 10
    // Line 11
    // Line 12
    // Line 13
    // Line 14
    // Line 15
    // Line 16
    // Line 17
    // Line 18
    // Line 19
    // Line 20
}

switch ($something) {
    case '1':
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    break;
    case '2':
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    break;
    case '3':
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    break;
    case '4':
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    break;
    case '5':
    // Line 1
    // Line 2
    // Line 3
    // Line 4
    // Line 5
    break;
}

// Wrong comment
if ($condition) {
    echo "true";
}//end foreach

if ($condition) {
    echo "true";
} //end if

try {
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
} catch (Exception $e) {
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
}

try {
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
} catch (Exception $e) {
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
}

try {
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
} catch (Exception $e) {
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
}//end catch

try {
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
} catch (DALException $e) {
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
    // some code here.
} catch (ChannelException $e) {
    // some code here.
} catch (Exception $e) {
    // some code here.
}

switch ($foo) {
    case 'one' : {
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        break;
    }
    case 'one' :
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
        // some code here.
    break;
}//end switch
?>